#include <stdio.h>
#include <stdlib.h>
#define MaxSize 20

typedef struct  {

        int elem[MaxSize];

        int length;

} SqList;



void InitList(SqList *&L)  { //初始化SqList

        L = (SqList *)malloc(sizeof(SqList));

        L->length = 0;

}

void DestroyList(SqList *&L) //销毁SqList

{

        free(L);

}

void DispList(SqList *L)  {
        for(int i=0; i<L->length; i++){
        	printf("%d ",L->elem[i]);
		} 
}

int main(){
	SqList sql={
	    {1,2,3,4,5,6},
	    6
	};
	SqList *s = &sql;
	DispList(s);
	DestroyList(s);
	return 0;
}